<div class="GoodsSearchWrap">

<{if $searchtotal}>
<div class="search_total"><{t}>共有<{/t}><font color='red'><{$searchtotal}></font><{t}>个赠品<{/t}></div>
<{/if}>

  <{if !count($products)}>
    <h1 class="error" style=""><{t}>非常抱歉，没有任何可兑换赠品<{/t}></h1>
    <div align='center'><a href="javascript:history.back(1)"><{t}>返回上一页<{/t}></a><a href="./" style="padding-left:20px"><{t}>返回首页<{/t}></a></div>
  <{/if}>
  <{include file="site/gallery/type/list.html"}>
  <{pagers data=$pager}> </div>

<script>
window.addEvent('domready', function(){
try{
/*关键字高亮*/
(function(replace_str){
    var replace=replace_str.split("+");
    if(replace.length){
      $ES('.entry-title').each(function(r){
        for(i=0;i<replace.length;i++){
          if(replace[i]){
            var reg=new RegExp("("+replace[i].escapeRegExp()+")","gi");
            r.setText(r.get('text').replace(reg,function(){
              return "{0}"+arguments[1]+"{1}";
            }));
          }
        }
        r.set('html',r.get('text').format("<font color=red>","</font>"));
      });
    }
  })('<{$search_array}>');
}catch(e){}
if(window.ie6)return;
var gallerybar = $('gallerybar');
var gallerybarSize = gallerybar.getSize();
var gallerybarPos  = gallerybar.getPosition();
var fixedStart = gallerybarSize.y+gallerybarPos.y;

var fixGalleryBar = function(){
    if(fixedStart<this.getScrollTop()){
         gallerybar.addClass('fixed').setStyles({'width':gallerybarSize.x});
    }else{
         gallerybar.removeClass('fixed').setStyles({'width':'auto'});
    }
};

window.addEvents({
   'resize':fixGalleryBar,
   'scroll':fixGalleryBar
});


});

var Shop = {
	url:{diff:''}
}

</script>

<{script src='goodscupcake.js' app='site'}>
